package config;

import java.util.HashMap;
import java.util.Map;

public class ActionMapping {
    private Map<String, Action> actions;

    @Override
    public String toString() {
        return "ActionMapping{" +
                "actions=" + actions +
                '}';
    }

    public void addAction(Action action) {
        actions.put(action.getPath(), action);
    }

    public Action findAction(String path) {
        return actions.get(path);
    }

    public ActionMapping() {
        this.actions = new HashMap<>();
    }

    public Map<String, Action> getActions() {
        return actions;
    }

    public void setActions(Map<String, Action> actions) {
        this.actions = actions;
    }
}
